<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pybindgen.typehandlers.ctypeparser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pybindgen-module.html">Package&nbsp;pybindgen</a> ::
        <a href="pybindgen.typehandlers-module.html">Package&nbsp;typehandlers</a> ::
        Package&nbsp;ctypeparser
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pybindgen.typehandlers.ctypeparser-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package ctypeparser</h1><p class="nomargin-top"><span class="codelink"><a href="pybindgen.typehandlers.ctypeparser-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Submodules</span></td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="pybindgen.typehandlers.ctypeparser.tokenizer-module.html">pybindgen.typehandlers.ctypeparser.tokenizer</a></strong>: <em class="summary">Tokenize C++ source code.</em>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pybindgen.typehandlers.ctypeparser.CType-class.html" class="summary-name">CType</a><br />
      A <a href="pybindgen.typehandlers.ctypeparser.CType-class.html" 
        class="link">CType</a> represents a C/C++ type as a list of items.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pybindgen.typehandlers.ctypeparser.TypeTraits-class.html" class="summary-name">TypeTraits</a><br />
      Parse a C type and gather some interesting properties.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pybindgen.typehandlers.ctypeparser-module.html#parse_type" class="summary-sig-name">parse_type</a>(<span class="summary-sig-arg">type_string</span>)</span><br />
      Parse a C type string.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.ctypeparser-pysrc.html#parse_type">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_parse_type-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_parse_type-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_parse_type" name="call_graph_for_parse_type">
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#__init__" title="TypeTraits.__init__()" alt="" coords="24,5,227,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#parse_type" title="parse_type()" alt="" coords="293,33,429,65"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#_parse_type_recursive" title="_parse_type_recursive()" alt="" coords="477,5,717,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string" title="normalize_type_string()" alt="" coords="5,61,245,93"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.tokenizer-module.html#GetTokens" title="tokenizer.GetTokens()" alt="" coords="487,61,708,93"/>
</map>
  <img src="call_graph_for_parse_type.gif" alt='' usemap="#call_graph_for_parse_type" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string" class="summary-sig-name">normalize_type_string</a>(<span class="summary-sig-arg">type_string</span>)</span><br />
      Return a type string in a canonical format, with deterministic 
      placement of modifiers and spacing.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.ctypeparser-pysrc.html#normalize_type_string">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_normalize_type_-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_normalize_type_-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_normalize_type_" name="call_graph_for_normalize_type_">
<area shape="rect" href="pybindgen.gccxmlparser-module.html#normalize_name" title="gccxmlparser.normalize_name()" alt="" coords="5,5,317,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string" title="normalize_type_string()" alt="" coords="365,33,605,65"/>
<area shape="rect" href="pybindgen.typehandlers.base.TypeMatcher-class.html#register" title="base.TypeMatcher.register()" alt="" coords="24,61,299,93"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.CType-class.html#__str__" title="CType.__str__()" alt="" coords="655,5,815,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#parse_type" title="parse_type()" alt="" coords="667,61,803,93"/>
</map>
  <img src="call_graph_for_normalize_type_.gif" alt='' usemap="#call_graph_for_normalize_type_" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Variables</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="MODIFIERS"></a><span class="summary-name">MODIFIERS</span> = <code title="['const', 'volatile']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">const</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">volatile</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pybindgen.typehandlers.ctypeparser'"><code class="variable-quote">'</code><code class="variable-string">pybindgen.typehandlers.ctypeparser</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="parse_type"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parse_type</span>(<span class="sig-arg">type_string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pybindgen.typehandlers.ctypeparser-pysrc.html#parse_type">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_parse_type-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </tr></table>
  <div style="display:none" id="call_graph_for_parse_type-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_parse_type" name="call_graph_for_parse_type">
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#__init__" title="TypeTraits.__init__()" alt="" coords="24,5,227,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#parse_type" title="parse_type()" alt="" coords="293,33,429,65"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#_parse_type_recursive" title="_parse_type_recursive()" alt="" coords="477,5,717,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string" title="normalize_type_string()" alt="" coords="5,61,245,93"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.tokenizer-module.html#GetTokens" title="tokenizer.GetTokens()" alt="" coords="487,61,708,93"/>
</map>
  <img src="call_graph_for_parse_type.gif" alt='' usemap="#call_graph_for_parse_type" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  <p>Parse a C type string.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>type_string</code></strong> - C type expression</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>a <a href="pybindgen.typehandlers.ctypeparser.CType-class.html" 
          class="link">CType</a> object representing the type</dd>
  </dl>
</td></tr></table>
</div>
<a name="normalize_type_string"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">normalize_type_string</span>(<span class="sig-arg">type_string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pybindgen.typehandlers.ctypeparser-pysrc.html#normalize_type_string">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_normalize_type_-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </tr></table>
  <div style="display:none" id="call_graph_for_normalize_type_-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_normalize_type_" name="call_graph_for_normalize_type_">
<area shape="rect" href="pybindgen.gccxmlparser-module.html#normalize_name" title="gccxmlparser.normalize_name()" alt="" coords="5,5,317,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string" title="normalize_type_string()" alt="" coords="365,33,605,65"/>
<area shape="rect" href="pybindgen.typehandlers.base.TypeMatcher-class.html#register" title="base.TypeMatcher.register()" alt="" coords="24,61,299,93"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser.CType-class.html#__str__" title="CType.__str__()" alt="" coords="655,5,815,37"/>
<area shape="rect" href="pybindgen.typehandlers.ctypeparser-module.html#parse_type" title="parse_type()" alt="" coords="667,61,803,93"/>
</map>
  <img src="call_graph_for_normalize_type_.gif" alt='' usemap="#call_graph_for_normalize_type_" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  <p>Return a type string in a canonical format, with deterministic 
  placement of modifiers and spacing.  Useful to make sure two type strings
  match regardless of small variations of representation that do not change
  the meaning.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>type_string</code></strong> - C type expression</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>another string representing the same C type but in a canonical 
          format
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'char *'</span>)
<span class="py-output">'char *'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'const foo::bar&lt;const char*, zbr&amp;&gt;*'</span>)
<span class="py-output">'foo::bar&lt; char const *, zbr &amp; &gt; const *'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'const ::bar*'</span>)
<span class="py-output">'bar const *'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'const char*const'</span>)
<span class="py-output">'char const * const'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'const char*const*const'</span>)
<span class="py-output">'char const * const * const'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>normalize_type_string(<span class="py-string">'const std::map&lt;std::string, void (*) (int, std::vector&lt;zbr&gt;) &gt;'</span>)
<span class="py-output">'std::map&lt; std::string, void ( * ) ( int, std::vector&lt; zbr &gt; ) &gt; const'</span></pre></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 12 17:23:07 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
